package com.juzipi.thread.test;

/**
 * @Author juzipi
 * @Date 2021/6/15 17:03
 * @Info
 */
public class LambdaTest1 {

    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.eat("大黄");

        //简化，转化的目标必须是接口，实现类也不行
        Cat cats = cat -> System.out.println(cat+"在吃屎");
        cats.eat("大黄");
    }



}
interface Cat{

    void eat(String name);


}

class Dog implements Cat{
    @Override
    public void eat(String name) {
        System.out.println(name+"在吃屎");
    }
}